﻿<%@ Page Title="" Language="C#" MasterPageFile="~/UserView.master" AutoEventWireup="true" CodeBehind="ManagerAuctions.aspx.cs" Inherits="BestBuy.BuyerViews.ManagerAuctions" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<section id="BookmarkAuction">
    <div class="tabbable">
        <ul class="nav nav-tabs">
            <li class="active"><a href="#tab_create_auctions" data-toggle="tab">&nbsp; Open Auctions</a></li>
            <li><a href="#tab_end_auctions" data-toggle="tab">End Auciton</a></li>
            <li><a href="#tab_bookmark_auction" data-toggle="tab">Bookmark Auciton</a></li>
        </ul>
        <div class="tab-content">
            <div class="tab-pane" id="tab_bookmark_auction">
                <asp:GridView ID="gvBookmark" runat="server" AutoGenerateColumns="False" 
                    onrowdatabound="gvBookmark_RowDataBound" Width="100%">
                    <Columns>
                        <asp:TemplateField HeaderText="Auction">
                            <ItemTemplate>
                                <asp:HyperLink ID="AuctionLink" runat="server" Text='<%# Bind("AuctionID") %>'></asp:HyperLink>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="End Time">
                            <ItemTemplate>
                                <asp:Label ID="EndTimeLable" runat="server" Text='<%# Bind("AuctionID") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText = "Status">
                            <ItemTemplate>
                                <asp:Label id="StatusLable_bookmark" runat="server"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
            </div>

            <div class="tab-pane  active" id="tab_create_auctions">
                <asp:GridView ID="gvCreateAuctions" runat="server" AutoGenerateColumns="False"
                    Width = "100%" OnRowDataBound="gvCreateAuctions_RowDataBound" 
                    onselectedindexchanged="gvCreateAuctions_SelectedIndexChanged">
                    <Columns>
                        <asp:HyperLinkField DataTextField="Title" HeaderText="Auction" 
                        DataNavigateUrlFields="ID" DataNavigateUrlFormatString="~/UserViews/SellerBid.aspx?AuctionID={0}"/>
                        <asp:TemplateField HeaderText="End Time">
                            <ItemTemplate>
                                <asp:Label ID="EndTimeLable_create" runat="server" Text='<%# Bind("EndTime") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText = "Status">
                            <ItemTemplate>
                                <asp:Label ID="StatusLable_create" runat="server"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:Button CssClass="btn" Text="Delete" id="DeleteButton" runat="server" OnClick="DeleteButtion_Click"
                                  OnClientClick="javascript:ShowConfirm('Are you sure?', this); return false;" ObjectId='<%# Eval("ID") %>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
            </div>
        
            <div class="tab-pane" id="tab_end_auctions">
                <asp:GridView ID="gvEndAuctions" runat="server" Width="100%" 
                    OnRowDataBound="gvEndAuctions_RowDataBound" AutoGenerateColumns="False">
                    <Columns>
                        <asp:TemplateField HeaderText="Title">
                            <ItemTemplate>
                                <asp:HyperLink ID="AuctionLink_End" runat="server" Text='<%# Bind("AuctionID") %>'></asp:HyperLink>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField HeaderText="Price"  DataField="Price"/>
                        <asp:TemplateField HeaderText = "Status">
                            <ItemTemplate>
                                <asp:Label ID="Statuslable_End" runat="server"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:HyperLink ID="FeedbackLink" Text="Feedback" runat="server"></asp:HyperLink>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
            </div>
        </div>    
    </div>
</section>

</asp:Content>
